package 掘金;

/**
 * @author vivi20
 * @ClassName SingletonForEnum
 * @description: TODO
 * @Date 2020/3/28 10:16
 * @Vertion 1.0
 */
public class SingletonForEnum {

    private SingletonForEnum() {
    }

    private enum Singleton{
        INSTANCE;
        private final SingletonForEnum instance;
        Singleton(){
            instance = new SingletonForEnum();
        }
        private SingletonForEnum getInstance(){
            return instance;
        }
    }

    public static SingletonForEnum getInstance(){
        return Singleton.INSTANCE.getInstance();
    }




}
